[TOO-314] Tool documentation auto generation tool and replacing hardcode mdx for component based one#705
[TOO-314] Tool documentation auto generation tool and replacing hardcode mdx for component based one#705
Conversation
…ode mdx for component based one
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
app/_components/toolkit-docs/components/AvailableToolsTable.tsx
Outdated
Show resolved
Hide resolved
app/_components/toolkit-docs/components/documentation-chunk-renderer.tsx
Show resolved
Hide resolved
app/_components/toolkit-docs/components/AvailableToolsTable.tsx
Outdated
Show resolved
Hide resolved
Resolve all merge conflicts: - Keep our scope-picker.tsx with PostHog tracking - Keep our not-found.tsx with Suspense boundary fix - Keep our package.json with toolkit scripts and mdx deps - Keep next-sitemap.config.js (deleted in main) - Merge globals.css (keyframes + nextra-steps styling) - Merge gitignore (our additions)
app/_components/toolkit-docs/components/documentation-chunk-renderer.tsx
Show resolved
Hide resolved
…y curser (yes, i wil blame him)
| list.push(toolkit); | ||
| } else { | ||
| grouped.set(category, [toolkit]); | ||
| } |
There was a problem hiding this comment.
Unreachable else branch in groupByCategory function
Low Severity
The else branch in the groupByCategory function is unreachable dead code. The function first checks if (!grouped.has(category)) and sets an empty array if the category doesn't exist. It then immediately retrieves the list with grouped.get(category). Since the category is guaranteed to exist after the first conditional, list will always be defined, making the else branch impossible to reach.
Additional Locations (1)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| }; | ||
|
|
||
| export default meta; | ||
| `; |
There was a problem hiding this comment.
Empty array produces invalid JavaScript syntax in meta generation
Low Severity
The generateCategoryMeta and generateMainMeta functions produce syntactically invalid JavaScript when given empty arrays. In generateCategoryMeta, when toolkits is empty, entries becomes an empty string, but the template still includes a trailing comma: ${entries},. This produces { , } which is invalid. Similarly in generateMainMeta, an empty categoryEntries produces a double comma between index and the separator entry. The tests for empty arrays pass only because they check string containment rather than syntax validity.
Additional Locations (1)
| ); | ||
| } | ||
|
|
||
| export { CopyButton }; |
There was a problem hiding this comment.
Unused export CopyButton from scope-picker module
Low Severity
The CopyButton component is exported but never imported by any other module. Other files use the existing CopyButton from tabbed-code-block/copy-button.tsx instead. This export clutters the module's public API and may confuse developers about which CopyButton to use.
|
|
||
| export function buildScopeDisplayItems(scopes: string[]): string[] { | ||
| return normalizeScopes(scopes); | ||
| } |
There was a problem hiding this comment.
|
@jottakka this PR is too large to load to review. Can you please split it so the frontend folks can review the generator code more closely? Then we can follow up with the generated code in a separate PR with a lighter review cycle. |


Note
Medium Risk
Adds a new GitHub Actions automation that generates/commits docs data and rewrites integrations navigation, plus substantial UI refactors for toolkit docs pages; risk is mainly broken navigation/links or rendering regressions, not security-critical logic.
Overview
Introduces automation to regenerate toolkit JSON after Porter deploys and open a PR, including a new
.github/scripts/sync-toolkit-sidebar.tsthat derives integrations sidebar_meta.tsxfiles fromdata/toolkits/(category mapping via@arcadeai/design-system, optional--prune, dry-run/verbose support) and accompanying tests/docs.Reworks toolkit docs rendering toward component-driven pages: adds a suite of
app/_components/toolkit-docscomponents (tools table w/ search/filter/sort/pagination + secrets indicators, MDX chunk injection w/ caching and deterministic ordering, dynamic code examples, parameters/scopes rendering, per-tool sections, and page actions like “copy page”/“edit JSON on GitHub”) with targeted unit tests and architecture docs.Updates app UX plumbing:
ScopePickerbecomes a richer, optionally controlled selector with requirements summary/copy actions/pagination and secrets support,ToolInfoswitches from design-system icon components topublicIconUrlimages, andgetDashboardUrlnow normalizes base/prefix (defaulting tohttps://app.arcade.devand configurable path prefix) to avoid hardcoded/dashboardpaths. Also adds repo/editor ignore + watcher exclusions (.cursorignore,.vscode/settings.json,.gitignore) to reduce large-repo overhead.Written by Cursor Bugbot for commit 1de10e6. This will update automatically on new commits. Configure here.